#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

using namespace std;

void print(int x[],int n);
void vvod(int x[],int n);

int func (int x, int y) {
     int rnd = (y-x+1)*x;
     return rnd;
}

void swap (int *pa, int *pb) {
    int q;
    q = *pa;
    *pa = *pb;
    *pb = q;
}

void square ( int x,  int& y){
    y = x*x;

}

char *glass(char *str1)
{
    int i, end;
    end = strlen(str1);
    for (i=0; i<end; i++)
        str1[i] = toupper(str1[i]);
    return str1;
}


int main()
{
    int a,b;
    cin >> a;
    cin >> b;
    cout << "Result of function 1 = " <<func(a,b) << endl;
    swap (a,b);
    cout << "Result of function 2 = " << a<<" " << b << endl;
    square (a,b);
    cout << "Result of function 3 = " << b << endl;
    int r[4];
    vvod(r,4);
    cout << "Result of function 4 = " <<endl;  print(r,4);

    char str[6] = "hello";
char buf[10];
*buf = '\0';
strcpy(buf,glass(str));


cout << "Result of function 5 = " << buf <<endl;




    return 0;
}



void print(int x[],int n)
{
    for (int i=0;i<n;i++)
        printf("%d",x[i]);
}
void vvod(int x[],int n)
{
    for(int i=0;i<n;i++)
        x[i]=rand()%11;
}
